/* 批量拖拽可视化组件样式 */
.visualizer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

.connectionLines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 连接线动画 */
.connectionLine {
  animation: dashMove 2s linear infinite;
}

@keyframes dashMove {
  0% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -24;
  }
}

/* 箭头动画 */
.arrow {
  animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* 源点动画 */
.sourcePoint {
  animation: sourcePointPulse 1s ease-in-out infinite alternate;
}

@keyframes sourcePointPulse {
  0% {
    r: 6;
    fill-opacity: 0.8;
  }
  100% {
    r: 8;
    fill-opacity: 1;
  }
}

/* 目标点动画 */
.targetPoint {
  animation: targetPointGlow 1.2s ease-in-out infinite;
}

@keyframes targetPointGlow {
  0%, 100% {
    r: 8;
    fill-opacity: 0.9;
  }
  50% {
    r: 10;
    fill-opacity: 1;
  }
}

/* 目标位置预览 */
.targetPreview {
  animation: previewPulse 1s ease-in-out infinite;
}

@keyframes previewPulse {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
  }
}

/* 统计浮窗 */
.statsFloater {
  position: fixed;
  top: 100px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid #e8e8e8;
  padding: 16px;
  min-width: 200px;
  backdrop-filter: blur(12px);
  pointer-events: auto;
  animation: floaterSlideIn 0.4s ease-out;
}

@keyframes floaterSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.statsTitle {
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 12px;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 8px;
}

.statsContent {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.statItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.statLabel {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
}

.statValue {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: #f8f9fa;
  color: #495057;
}

.statValue.success {
  background: #d4edda;
  color: #155724;
}

.statValue.error {
  background: #f8d7da;
  color: #721c24;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .statsFloater {
    top: 80px;
    right: 16px;
    left: 16px;
    min-width: auto;
  }

  .connectionLine {
    stroke-width: 2;
  }

  .sourcePoint {
    r: 4;
  }

  .targetPoint {
    r: 6;
  }
}

@media (max-width: 480px) {
  .statsFloater {
    padding: 12px;
    top: 60px;
  }

  .statsTitle {
    font-size: 13px;
  }

  .statLabel,
  .statValue {
    font-size: 11px;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  .connectionLine {
    stroke-width: 4;
  }

  .sourcePoint,
  .targetPoint {
    stroke-width: 3;
  }

  .statsFloater {
    border-width: 2px;
    background: white;
  }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
  .connectionLine,
  .arrow,
  .sourcePoint,
  .targetPoint,
  .targetPreview,
  .statsFloater {
    animation: none;
  }

  .targetPreview {
    opacity: 0.8;
  }
}
